CSS Interview Questions and Answers
Question: If background and color should always be set together, why do they exist as separate properties?Answer: There are several reasons for this. First, style sheets become more legible -- both for humans and machines. The background property is already the most complex property in CSS1 and combining it with color would make it even more complex. Second, color inherits, but background doesn't and this would be a source of confusion. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is CSS?
- What are Cascading Style Sheets?
- As a reader, how can I make my browser recognize my own style sheet?
- How do I combine multiple sheets into one?
- What are Style Sheets?